package servlet;

import com.lagou.bean.HttpRequest;
import com.lagou.bean.HttpResponse;
import com.lagou.servlet.HttpServlet;
import com.lagou.utils.HttpProtocolUtil;

import java.io.IOException;

public class Demo1Servlet extends HttpServlet {
    @Override
    public void doGet(HttpRequest request, HttpResponse response) {
        String content = "<h1>demo1 get</h1>";
        try {
            response.outputContent(content);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    public void doPost(HttpRequest request, HttpResponse response) {
        String content = "<h1>demo1 post</h1>";
        try {
            response.outputContent(content);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    public void init() throws Exception {

    }

    @Override
    public void destory() throws Exception {

    }
}
